<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>042-三元运算.html</title>
	<script>
	var a = -0.23;

	/*
		if(a < 0){
			alert("负数");
		}else{
			alert("正数");
		}
	*/
		a<0 ? alert("负数") : alert("正数")	
	</script>
</head>
<body>

</body>
</html>